<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="../global/global.jsp" %>
<%TestsPage testsPage = new TestsPage(request,response);%>
<c:set var="testsPage" value ="<%=testsPage%>"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <jsp:include page="../components/htmlHeader.jsp"></jsp:include>
    <title><testU:i18n>testsPage.title</testU:i18n></title>
    <script language="JavaScript" src="<%=cPath%>/testYou/resources/validations.js">
    </script>
</head>
<body class="bgColor">
<jsp:include page="../components/header.jsp"/>
<br><br>
<%if (testsPage.hasMessage()){ %>
<center><testU:i18n>${testsPage.getMessage()}</testU:i18n></center>
<%} %>
<br>

<form action="<%=cPath%><%=response.encodeURL(ManageTestServlet.URL)%>" method="post" id="testsForm" name="testsForm">
    <input type="hidden" value="edit_delete" name="<%=ManageTestServlet.OPERATION%>" id="hiddenField">
    <table class="centerTable30marg width40">
        <tbody>
        <tr>
            <td class="padLeft10 alignCenter" rowspan="3">
                <tU:selectListComponent validate="true" editButtonId="editButton" formName="testsForm" deleteButtonId="deleteButton"/>
            </td>
            <td>
                <c:set var="langID" value="${userPage.user.lang}"/>
                <c:set value="<%=ManageTestServlet.OPERATION_EDIT%>" var="editTest"/>
                <input class="width110" disabled="disabled" type="submit" value='<testU:i18n>testsPage.edit</testU:i18n>' id="editButton"
                       onclick="operEdit('${editTest}','testsForm');"/>
            </td>
        <tr>
            <td><c:set value="<%=ManageTestServlet.OPERATION_DELETE%>" var="delTest"/>
                <input class="width110" disabled="disabled" type="submit" value="<testU:i18n>testsPage.delete</testU:i18n>" id="deleteButton"
                       onclick="operDelete('${delTest}','testsForm');"/>
            </td>
        </tr>
        <tr>
            <td><c:set value="<%=ManageTestServlet.OPERATION_NEW%>" var="addTest"/>
                <input class="width110" type="submit" value='<testU:i18n>testsPage.new</testU:i18n>'
                       onclick="operAdd('${addTest}','testsForm');"/>
            </td>
        <tr>
        </tr>
        </tbody>
    </table>
</form>
<%if (testsPage.hasError()){%>
<script type="text/javascript">
    alert('<testU:i18n>${testsPage.getError()}</testU:i18n>');
</script>
<%} %>
</body>
</html>